import { createApp } from 'vue'
import App from './App.vue'
import './assets/css/main.css'

import router from '@/router'

import axios from 'axios'
import VueAxios from 'vue-axios'

import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 滚动插件
import vueSeamlessScroll from '@zengxiaohui/vue3-seamless-scroll'


//创建pinia实例
const pinia = createPinia()
//引用pinia持久化插件
pinia.use(piniaPluginPersistedstate)

let app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus)
app.use(vueSeamlessScroll)
app.use(router)
app.use(VueAxios, axios)
app.use(pinia)
app.mount('#app')
